package com.bc.trade.model;

import com.bc.common.basemodel.BaseTradeStrategy;
import com.bc.trade.config.R;
import com.fs.common.util.FSJedis;

@SuppressWarnings("serial")
public class TradeStrategy extends BaseTradeStrategy<TradeStrategy> {
	
	public static final TradeStrategy dao = new TradeStrategy().dao();
	
	public TradeStrategy selectFromRedis(String merchCode,String payType){
		if (R.IS_REDIS) {
			return FSJedis.get(R.RK_TS, merchCode + payType, TradeStrategy.class);
		} else {
			return super.findFirst("SELECT * FROM bd_trade_strategy WHERE merchCode=? AND payTypeCode=?", merchCode, payType);
		}
	}

}
